home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / bgui12.lha / Classes / PaletteClass / paletteclass.doc < prev    next >
Text File  |  1995-05-29  |  4KB  |  109 lines

  1.  
  2.                File: paletteclass.doc
  3.         Description: PaletteClass documentation.
  4.           Copyright: (C) Copyright 1995 Jaba Development.
  5.                      (C) Copyright 1995 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. paletteclass/--background--
  13. paletteclass/Methods
  14. paletteclass/Attributes
  15.  
  16. paletteclass/--background--                        paletteclass/--background--
  17.  
  18.     NAME
  19.         Class:          paletteclass
  20.         Superclass:     baseclass
  21.         Include File:   "PaletteClass.h"
  22.  
  23.     FUNCTION
  24.         To  provide you with a palette selector gadget simular to the gadtools
  25.         palette gadget. It allows you to select a pen from  a range  of screen
  26.         colors or a range of pens selected by you.
  27.  
  28.         Objects  from  this  class  send  out  the  following  attribute pairs
  29.         in their notification messages:
  30.  
  31.         GA_ID                   - Gadget object ID.
  32.         PALETTE_CurrentColor    - The currently selected pen.
  33.  
  34.     NOTE
  35.         This class is provided as source code.   To make use of this class you
  36.         must compile it into an object module and  link it in  with  your main
  37.         program.
  38.  
  39.         Also your program must open the following libraries:
  40.  
  41.         intuition.library       - V37 or better.
  42.         graphics.library        - V37 or better.
  43.         utility.library         - V37 or better.
  44.         bgui.library            - V39 or better.
  45.  
  46.         Ofcourse these libraries must remain open until you are done using the
  47.         class.
  48.  
  49. paletteclass/Methods                                      paletteclass/Methods
  50.  
  51.     NEW METHODS
  52.         None.
  53.  
  54.     CHANGED METHODS
  55.         None.
  56.  
  57. paletteclass/Attributes                                paletteclass/Attributes
  58.  
  59.     NOTE
  60.         All baseclass attributes are also valid for this class.
  61.  
  62.     NAME
  63.         PALETTE_Depth -- ( ULONG )
  64.  
  65.     FUNCTION
  66.         To determine the depth of the palette object.   Currently this is  the
  67.         only way to determine the amount of colors in the palette object. This
  68.         will always be a  power  of  2 (I.E. 2, 4, 8, 16, 32, 64, 128 or 256).
  69.         Allowable values here are 1 for two colors through 8 for 256 colors.
  70.  
  71.         Default is 1 (two colors). Applicability is (I).
  72.  
  73.     NAME
  74.         PALETTE_ColorOffset -- ( ULONG )
  75.  
  76.     FUNCTION
  77.         To specify the first color which is used in  the palette.  Please note
  78.         that you must specify an ordinal number here, not a pen number.   This
  79.         value  must  range  between  0  and  256  minus  the  amount of colors
  80.         displayed in the palette object.
  81.  
  82.         Default is 0. Applicability is (I).
  83.  
  84.     NAME
  85.         PALETTE_PenTable -- ( UWORD * )
  86.  
  87.     FUNCTION
  88.         To optionally specify an array with pen numbers so that you  can build
  89.         a palette object with the colors you want. Please note that  the array
  90.         must contain at least PALETTE_ColorOffset + ( 1 << PALETTE_Depth ) pen
  91.         entries. This is because the PALETTE_ColorOffset attribute  determines
  92.         at which offset in the array the class will get it's pens.
  93.  
  94.         Default is NULL. Applicability is (I).
  95.  
  96.     SEE ALSO
  97.         PALETTE_ColorOffset
  98.  
  99.     NAME
  100.         PALETTE_CurrentColor -- ( ULONG )
  101.  
  102.     FUNCTION
  103.         To determine the currently selected pen in the palette object.  Please
  104.         note that this number is a  pen  number,  not  an ordinal color number
  105.         within the palette object itself.
  106.  
  107.         Default  is  the  first  color in the palette object. Applicability is
  108.         (ISGNU).
  109.